package com.pym.content.api;

import com.pym.base.model.PageParams;
import com.pym.base.model.PageResult;
import com.pym.content.model.dto.QueryCourseParamsDto;
import com.pym.content.model.po.CourseBase;
import com.pym.content.service.CourseBaseInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api("课程管理相关的接口")
public class CourseBaseInfoController  {

    @Autowired
    private CourseBaseInfoService courseBaseInfoService;

    @PostMapping ("/course/list")
    @ApiOperation("课程查询的接口")
    public PageResult<CourseBase> list(PageParams pageParams, @RequestBody QueryCourseParamsDto queryCourseParamsDto){
        return  courseBaseInfoService.queryCourseBaseList(pageParams, queryCourseParamsDto);
    }
}
